<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>病例列表</title>
    <link rel="stylesheet" href="/template/layui/css/layui.css">
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">医院档案</div>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <a href="javascript:;">贤心</a>
            </li>
            <li class="layui-nav-item"><a href="">退出</a></li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <ul class="layui-nav layui-nav-tree">
                <li class="layui-nav-item"><a href="javascript:;">病例列表</a></li>
<!--                <li class="layui-nav-item layui-this"><a href="caseList.php">病例列表</a></li>-->
            </ul>
        </div>
    </div>
    <div class="layui-body" style="padding: 20px;">
        <fieldset class="layui-elem-field layui-field-title">
            <legend>病例列表</legend>
        </fieldset>
        <table class="layui-hide" id="DataList" lay-filter="DataList"></table>
    </div>
    <div class="layui-footer">© 医院档案</div>
</div>
<script src="/template/layui/layui.js"></script>
<script>
    layui.use(['element', 'table'], function () {
        var element = layui.element;
        var table = layui.table;
        table.render({
            elem: '#DataList',
            url: '?act=getList',
            toolbar: '#toolbarDemo'
            , cols: [[
                {type: 'checkbox', fixed: 'left'}
                , {field: 'id', title: 'ID', width: 80, fixed: 'left', unresize: true, sort: true}
                , {field: 'username', title: '用户名', width: 120, edit: 'text'}
                , {
                    field: 'email', title: '邮箱', width: 150, edit: 'text', templet: function (res) {
                        return '<em>' + res.email + '</em>'
                    }
                }
                , {field: 'sex', title: '性别', width: 80, edit: 'text', sort: true}
                , {field: 'city', title: '城市', width: 100}
                , {field: 'sign', title: '签名'}
                , {field: 'experience', title: '积分', width: 80, sort: true}
                , {field: 'ip', title: 'IP', width: 120}
                , {field: 'logins', title: '登入次数', width: 100, sort: true}
                , {field: 'joinTime', title: '加入时间', width: 120}
                , {fixed: 'right', title: '操作', toolbar: '#barDemo', width: 150}
            ]]
            , page: true
        });
    });
</script>
</body>
</html>